{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "4690affb",
   "metadata": {},
   "outputs": [],
   "source": [
    "a = {1,2,3,4,5,'a','b','c','d','e'}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "7bd1e47b",
   "metadata": {},
   "outputs": [],
   "source": [
    "b = {5,6,7,8,9,10,'f','g','h','i','j'}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "4223f112",
   "metadata": {},
   "outputs": [],
   "source": [
    "c = {1,2,3,4,5,6,7,8,9,10,'a','c','e','g','i'}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "4481f0be",
   "metadata": {},
   "outputs": [],
   "source": [
    "aa = a.union(b)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "f55c9719",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{1,\n",
       " 10,\n",
       " 2,\n",
       " 3,\n",
       " 4,\n",
       " 5,\n",
       " 6,\n",
       " 7,\n",
       " 8,\n",
       " 9,\n",
       " 'a',\n",
       " 'b',\n",
       " 'c',\n",
       " 'd',\n",
       " 'e',\n",
       " 'f',\n",
       " 'g',\n",
       " 'h',\n",
       " 'i',\n",
       " 'j'}"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "aa"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "b6b3c2f5",
   "metadata": {},
   "outputs": [],
   "source": [
    "bb = a.intersection(c)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "be107e23",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{1, 2, 3, 4, 5, 'a', 'c', 'e'}"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bb"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "18f69615",
   "metadata": {},
   "outputs": [
    {
     "ename": "AttributeError",
     "evalue": "'set' object has no attribute 'symmeric_difference'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mAttributeError\u001b[0m                            Traceback (most recent call last)",
      "\u001b[1;32m~\\AppData\\Local\\Temp/ipykernel_14380/1593354811.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mcc\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0ma\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msymmeric_difference\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mb\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mAttributeError\u001b[0m: 'set' object has no attribute 'symmeric_difference'"
     ]
    }
   ],
   "source": [
    "cc = a.symmeric_difference(b)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "5106a3ee",
   "metadata": {},
   "outputs": [],
   "source": [
    "cc1 = a.symmetric_difference(c)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "622ca635",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{10, 6, 7, 8, 9, 'b', 'd', 'g', 'i'}"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cc1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "9a1935ba",
   "metadata": {},
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "unhashable type: 'set'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m~\\AppData\\Local\\Temp/ipykernel_14380/1816745368.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mdd\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0ma\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0madd\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mc\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m: unhashable type: 'set'"
     ]
    }
   ],
   "source": [
    "dd = a.add(c)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "7b03bcb6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{1, 2, 3, 4, 5, 'a', 'b', 'c', 'd', 'e'}"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "0e796681",
   "metadata": {},
   "outputs": [],
   "source": [
    "for i in c:\n",
    "    a.add(i)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "a0ef04a0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{1, 10, 2, 3, 4, 5, 6, 7, 8, 9, 'a', 'b', 'c', 'd', 'e', 'g', 'i'}"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "2eb5d70e",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
